package com.wzp.fulfill.infrastructure.gatewayimpl;

import com.wzp.fulfill.domain.model.fulfillorder.FulfillOrder;
import com.wzp.fulfill.domain.gateway.WarehouseApiGateway;
import com.wzp.fulfill.domain.model.warehouse.Warehouse;
import com.wzp.fulfill.domain.model.warehouse.Warehouses;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class WarehouseApiGatewayImpl implements WarehouseApiGateway {

    // 如果rpc框架用的是dubbo，这块，都可以去依赖dubbo reference
    // @Reference
    // private WarehouseApi warehouseApi;

    @Override
    public Warehouses getAll() {
        return new Warehouses();
    }

    @Override
    public Boolean lockInventory(Long warehouseId,
                                 Long orderId,
                                 List<String> skuCodes,
                                 List<Long> inventoryCount) {
        return true;
    }

    @Override
    public void sendFulfillOrder(FulfillOrder fulfillOrder, Warehouse warehouse) {

    }

}
